home *** CD-ROM | disk | FTP | other *** search
/ Game Audio Programming / GameAudioProgramming.iso / Extras / Dolby / DISK 2 / 02Dsurround.swf / scripts / DefineSprite_153 / frame_1 / DoAction.as
Encoding:
Text File  |  2002-02-03  |  465 b   |  26 lines

  1. function getPosition()
  2. {
  3.    if(bg.clicked == "a1")
  4.    {
  5.       position -= step;
  6.    }
  7.    else if(bg.clicked == "a2")
  8.    {
  9.       position += step;
  10.    }
  11.    else if(bg.direction == bg.olddirection)
  12.    {
  13.       position += page * bg.direction;
  14.    }
  15.    if(1 < position)
  16.    {
  17.       position = 1;
  18.    }
  19.    else if(position < 0)
  20.    {
  21.       position = 0;
  22.    }
  23.    bg.m._y = position * bg.dragmax * 2 - bg.dragmax;
  24. }
  25. var styles = {Mac:1,PC:2,Custom1:3};
  26.